<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js"></script>
<body>
  <h3>后台管理界面</h3>
  <p>
    欢迎您：<span id="username"></span>
  </p>
</body>
<script>
    $(function(){
        var userInfo = JSON.parse(localStorage.getItem("userInfo"))
        $('#username').text(userInfo.username)

        // 发请求，获取学生信息
        $.ajax({
            type:'get',
            url:'http://localhost:8080/students',
            data:{
                pageNum:1,
                pageSize:5,
                name:'1'
            },
            dataType:'json',
            headers:{
              'Authorization':userInfo.token
            },
            success:function(res){
                console.log(res)
            }
        })


    })
</script>
</html>